﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="startbookclub.aspx.cs" Inherits="BookClubIt.startbookclub" MasterPageFile="~/Master/Site.Master" Title="Create book club" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
  <script type="text/javascript">
      $(document).ready(function () {
          $('.clubtype').change(function () {
              if ($('#chkClassroom').attr('checked')) {
                  $('#studentemails').show();
              } else {
                  $('#studentemails').hide();
              }
          });
});
</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<div class="container">
<h1><small>Create a Book Club</small></h1>

<div class="form-horizontal">

<%--<div class="control-group">
<label class="control-label" for="input01"><b style="color:#ff0000">*</b>This club is for: </label>
<div class="controls">
<label class="radio">
<input id="chkPersonalClub" class="clubtype" type="radio" checked="" value="personal" name="clubtype"/>
Personal
</label>
<label class="radio">
<input id="chkClassroom" class="clubtype" type="radio" value="classroom" name="clubtype"/>
Classroom
</label>
</div>
</div>
--%>
<%--<div class="control-group" id="studentemails" style="display:none">
<label class="control-label" for="input01"><b style="color:#ff0000">*</b> Students emails:</label>
<div class="controls">
<textarea  ID="Textarea1" cols="50" rows="6" runat="server"/>
<p class="help-block">Enter your students emails seperate by a comma.</p>
</div>
</div>--%>

<div class="control-group">
<label class="control-label" for="input01"><b style="color:#ff0000">*</b> Book club name:</label>
<div class="controls">
<asp:TextBox ID="txtClubName" runat="server" CssClass="" Width="300px" />
   <asp:RequiredFieldValidator 
             id="RequiredFieldValidator1" runat="server" 
             ErrorMessage="Required!"
             CssClass="error"
             ControlToValidate="txtClubName">
            </asp:RequiredFieldValidator>
</div>
</div>

<div class="control-group">
<label class="control-label" for="input01"><b style="color:#ff0000">*</b> Genre:</label>
<div class="controls">
<asp:DropDownList ID="ddlGenres" runat="server" appenddatabounditems="true"> 
  <asp:listitem value="Select Genre" Selected="True">Select Genre</asp:listitem>
   </asp:DropDownList>

<asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="ddlGenres" InitialValue="Select Genre"  ErrorMessage="Required!" CssClass="error" />


</div>
</div>

<div class="control-group">
<label class="control-label" for="input01"><b style="color:#ff0000">*</b> Description:</label>
<div class="controls">
<textarea  ID="txtDescription" cols="50" rows="6" runat="server"/>


   <asp:RequiredFieldValidator 
             id="RequiredFieldValidator3" runat="server" 
             ErrorMessage="Required!"
             CssClass="error"
             ControlToValidate="txtDescription">
            </asp:RequiredFieldValidator>
</div>
</div>


<div class="control-group">
<label class="control-label" for="input01">Rules:</label>
<div class="controls">
<textarea ID="txtRules"  runat="server" cols="50" rows="6"/>
</div>
</div>


<div class="control-group">
<label class="control-label" for="input01">Website:</label>
<div class="controls">
<asp:textbox ID="txtWebsite"  runat="server" Width="200px"/>
</div>
</div>


<div class="control-group">
<label class="control-label" for="input01">Avatar:</label>
<div class="controls">
<asp:Image ID="imgClubAvatar" runat="server" Height="40px" Width="40px" />
<asp:FileUpload ID="UploadImage" runat="server" />
<asp:Button ID="btnUpload" runat="server" CssClass="btn btn-small btn-primary" CausesValidation="false" Text="Upload" onclick="btnUpload_Click" />
</div>
</div>



<div class="control-group">
<label class="control-label" for="input01"><b style="color:#ff0000">*</b> Club type:</label>
<div class="controls">

<asp:RadioButtonList ID="rblClubType" runat="server" CssClass="club-type-list">
<asp:ListItem Text="<label style='color:#009245'>Public</label> <p>Anyone can join this group. Anyone can view group discussions and information.</p>" Value="1"/>
<asp:ListItem Text="<label style='color:#ff6600'>Private</label> <p>New members must be approved by moderators. Anyone can see book club information discussions, meetings, polls, and events but cannot participate unless a member of the book club.</p>" Value="2"/>
<asp:ListItem Text="<label style='color:#ff0000'>Secret</label> <p>New members must be approved by moderators. This book club will not appear in search results or in user profiles. Only moderators can invite new members.</p>" Value="3"/>
</asp:RadioButtonList>


   <asp:RequiredFieldValidator 
             id="RequiredFieldValidator2" runat="server" 
             ErrorMessage="Select a club type"
             CssClass="error"
             SetFocusOnError="true"
             ControlToValidate="rblClubType">
            </asp:RequiredFieldValidator>
</div>
</div>

<div class="control-group">
<div class="controls">
<label class="checkbox"><input type="checkbox" id="chk18andOver" runat="server" class="checkbox" name="over18"  />This group is for adults only (18+)</label>
</div>
</div>

<div class="control-group">
<div class="controls">
<label class="checkbox"><input type="checkbox" id="chkNonModAddEvents" runat="server" class="checkbox" name="nonmodaddevents"  checked="checked"/><span>Non-leaders can add events</span></label>
</div>
</div>

<div class="control-group">
<div class="controls">
<label class="checkbox"><input type="checkbox" id="chkNonModAddPolls" runat="server" class="checkbox" name="nonmodaddpolls" checked="checked" /><span>Non-leaders can create polls</span></label>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox"><input type="checkbox" id="chkNonModAddTopics" runat="server" class="checkbox" name="nonmodaddtopics" checked="checked" /><span>Non-leaders can create discussion topics</span></label>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox"><input type="checkbox" runat="server" id="chkRealMeet" class="checkbox"  name="realmeet" /><span>This group meets in real life</span></label>
</div>
</div>
<div class="form-actions">
<asp:button runat="server" text="Create Book Club" ID="btnCreateClub" OnClick="btnCreateClub_Click" CssClass="btn btn-large btn-primary" />
</div>  
</div>
</div>
</asp:Content>

